import {
  handleRequest
} from './index'

import request from '@/utils/request'
import {
  faceApiUrl
} from '../config'
//获取-项目风险金返还
export function getProjectRiskReturn(query) {
  return handleRequest({
    url: '/project-risk/fund-return/query',
    method: 'post',
    data: query
  })
}


//新增-项目风险金返还
export function addProjectRiskReturn(query) {
  return handleRequest({
    url: '/project-risk/fund-return',
    method: 'post',
    data: query
  })
}

//修改-项目风险金返还
export function editProjectRiskReturn(query) {
  return handleRequest({
    url: '/project-risk/fund-return/update',
    method: 'post',
    data: query
  })
}
//删除-项目风险金返还
export function delProjectRiskReturn(query) {
  return handleRequest({
    url: '/project-risk/fund-return/del',
    method: 'post',
    params: query
  })
}
//查看-项目风险金返还
export function checkProjectRiskReturn(query) {
  return handleRequest({
    url: '/project-risk/fund-return/query',
    method: 'get',
    params: query
  })
}

//打印-项目风险金返还
export function checkProjectRiskReturnPrint(query) {
  return handleRequest({
    url: '/project-risk/print',
    method: 'get',
    params: query
  })
}

//项目风险金:已返还金额/预留风险金-查询
export function checkAddData(query) {
  return handleRequest({
    url: '/project-risk/addData',
    method: 'get',
    params: query
  })
}

//新增项目风险金返还-公司财务资金部审批情况
export function addFinanceAudit(query) {
  return handleRequest({
    url: '/project-risk/finance-audit',
    method: 'post',
    data: query
  })
}

//新增项目风险金返还-公司商务管理部审批情况
export function addCommercialAudit(query) {
  return handleRequest({
    url: '/project-risk/commercial-audit',
    method: 'post',
    data: query
  })
}
/*
  个人风险金返还
*/

//获取-个人风险金返还
export function getPersonalRiskReturn(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn/query',
    method: 'post',
    data: query
  })
}


//新增-个人风险金返还
export function addPersonalRiskReturn(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn',
    method: 'post',
    data: query
  })
}

//修改-个人风险金返还
export function editPersonalRiskReturn(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn/update',
    method: 'post',
    data: query
  })
}
//删除-个人风险金返还
export function delPersonalRiskReturn(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn/del',
    method: 'post',
    params: query
  })
}
//查看-个人风险金返还
export function checkPersonalRiskReturn(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn/query',
    method: 'get',
    params: query
  })
}

//打印-个人风险金返还
export function checkPersonalRiskReturnPrint(query) {
  return handleRequest({
    url: '/perReserveRisk/print',
    method: 'get',
    params: query
  })
}

//新增个人风险金返还-公司财务资金部审批情况
export function addPersonalFinanceAudit(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn/finance',
    method: 'post',
    data: query
  })
}

//新增个人风险金返还-公司商务管理部审批情况
export function addPersonalCommercialAudit(query) {
  return handleRequest({
    url: '/perReserveRisk/fundReturn/commercial',
    method: 'post',
    data: query
  })
}

/*
  个人风险金抵转
*/

//获取-个人风险金抵转
export function getPersonalRiskTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/query',
    method: 'post',
    data: query
  })
}


//新增-个人风险金抵转
export function addPersonalRiskTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer',
    method: 'post',
    data: query
  })
}

//修改-个人风险金抵转
export function editPersonalRiskTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/update',
    method: 'post',
    data: query
  })
}
//删除-个人风险金抵转
export function delPersonalRiskTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/del',
    method: 'post',
    params: query
  })
}
//查看-个人风险金抵转
export function checkPersonalRiskTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/query',
    method: 'get',
    params: query
  })
}

//打印-个人风险金抵转
export function checkPersonalRiskTransferPrint(query) {
  return handleRequest({
    url: '/perReserve-riskFund/print',
    method: 'get',
    params: query
  })
}

//新增个人风险金抵转-公司财务资金部审批情况
export function addPersonalFinanceAuditTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/finance',
    method: 'post',
    data: query
  })
}

//新增个人风险金抵转-公司商务管理部审批情况
export function addPersonalCommercialAuditTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/commercial',
    method: 'post',
    data: query
  })
}

//新增个人预留风险金抵转-综合部审批情况
export function addPersonalCompAuditTransfer(query) {
  return handleRequest({
    url: '/perReserve-riskFund/transfer/comp-audit',
    method: 'post',
    data: query
  })
}


/**
 * 个人风险金补缴列表
 * @param parameter
 */
export function getPageCommercialPerSupplementaryPayment(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/getPageCommercialPerSupplementaryPayment',
    method: 'post',
    data: parameter
  })
}
/**
 * 个人风险金补缴统计
 * @param parameter
 */
export function getHasPayment(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/getHasPayment',
    method: 'post',
    data: parameter
  })
}
/**
 * 个人风险金补缴删除
 * @param parameter
 */
export function deleteByPrimaryKey(parameter) {
  console.log(parameter)
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/deleteByPrimaryKey/' + parameter.id,
    method: 'get',

  })
}
/**
 * 个人风险金补缴撤销
 * @param parameter
 */
export function cancelProcess(parameter) {
  console.log(parameter)
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/cancelProcess',
    method: 'get',
    params: parameter
  })
}
/**
 * 个人风险金补缴作废
 * @param parameter
 */
export function revoke(parameter) {
  console.log(parameter)
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/Revoke/' + parameter.id,
    method: 'get',

  })
}

/**
 * 个人风险金补缴新增
 * @param parameter
 */
export function insertSelective(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/insertSelective ',
    method: 'post',
    data: parameter
  })
}
/**
 * 个人风险金补缴修改
 * @param parameter
 */
export function updateByPrimaryKeySelective(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/updateByPrimaryKeySelective',
    method: 'post',
    data: parameter
  })
}

/**
 * 个人风险金补缴资料上传
 * @param parameter
 */
export function insertCommissionFile(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/insertCommissionFile',
    method: 'post',
    data: parameter
  })
}
/**
 * 个人风险金补缴详情
 * @param parameter
 */
export function getCommercialPerSupplementaryPaymentById(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/getCommercialPerSupplementaryPaymentById',
    method: 'get',
    params: parameter
  })
}

/**
 * 个人风险金补缴打印
 * @param parameter
 */
export function print(parameter) {
  return request({
    url: faceApiUrl + '/commercialPerSupplementaryPayment/print',
    method: 'get',
    params: parameter
  })
}